From: Florian Müllner Date: Thu, 22 Nov 2018 17:18:34 +0000 (+0100) Subject: messageTray: Re-enable unredirection when banner is destroyed X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~897^2~1^2~17 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=e5ce3d541e48dd75c9218312cd74ecb760ab857a;p=gnome-shell.git messageTray: Re-enable unredirection when banner is destroyed The intention of commit 4dc20398 was to disable unredirection while banners are shown, but the ::done-displaying signal currently used for re-enabling unredirection is only emitted under some circumstances, so it's possible that unredirection is left disabled indefinitely, whoops. Fix this by tying disabling unredirection explicitly to the lifetime of the banner actor. https://gitlab.gnome.org/GNOME/gnome-shell/issues/799 --- diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index f8e2f0b9f..eebc93fdf 100644 --- a/js/ui/messageTray.js +++ b/js/ui/messageTray.js @@ -1298,10 +1298,8 @@ var MessageTray = new Lang.Class({ } this._banner = this._notification.createBanner(); - this._bannerClickedId = this._banner.connect('done-displaying', () => { - Meta.enable_unredirect_for_display(global.display); - this._escapeTray(); - }); + this._bannerClickedId = this._banner.connect('done-displaying', + this._escapeTray.bind(this)); this._bannerUnfocusedId = this._banner.connect('unfocused', () => { this._updateState(); }); @@ -1451,6 +1449,7 @@ var MessageTray = new Lang.Class({ this._pointerInNotification = false; this._notificationRemoved = false; + Meta.enable_unredirect_for_display(global.display); this._banner.actor.destroy(); this._banner = null;